import http from "@/utils/http";
const prefixUrl = {
  queryList: "/analysis/channel/list",
  queryChanelDict: "/analysis/channel/info",
  add: "/analysis/channel/add",
  update: "/analysis/channel/edit",
  updateStatus: "/analysis/channel/disable",
  delete: "/analysis/channel/delete",
  querChannelFact: "/analysis/channel/channelOverview",
  queryChannelPage: "/analysis/channel/getChannelChartDataforPage",
  queryChannelChart: "/analysis/channel/getChannelChartData",
};
export default {
  role: {
    queryList: "POST:" + prefixUrl.queryList,
    queryChanelDict: "POST:" + prefixUrl.queryChanelDict,
    add: "POST:" + prefixUrl.add,
    update: "POST:" + prefixUrl.update,
    updateStatus: "POST:" + prefixUrl.updateStatus,
    delete: "POST:" + prefixUrl.delete,
    querChannelFact: "POST:" + prefixUrl.querChannelFact,
    queryChannelPage: "POST:" + prefixUrl.queryChannelPage,
    queryChannelChart: "POST:" + prefixUrl.queryChannelChart,
  },
  chart: {
    querChannelFact(params = {}) {
      return http.post(prefixUrl.querChannelFact, params);
    },
    queryChannelPage(params = {}) {
      return http.post(prefixUrl.queryChannelPage, params);
    },
    queryChannelChart(params = {}) {
      return http.post(prefixUrl.queryChannelChart, params);
    },
  },
  list: {
    queryList(params = {}) {
      return http.post(prefixUrl.queryList, params);
    },
    queryChanelDict(params = {}) {
      return http.post(prefixUrl.queryChanelDict, params);
    },
    add(params = {}) {
      return http.post(prefixUrl.add, params);
    },
    update(params = {}) {
      return http.post(prefixUrl.update, params);
    },
    updateStatus(params = {}) {
      return http.post(prefixUrl.updateStatus, params);
    },
    delete(params = {}) {
      return http.post(prefixUrl.delete, params);
    },
  },
};
